Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added multi-arch support including ARM. #241

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

jqmichael
Copy link
Contributor

@jqmichael jqmichael commented Aug 26, 2020

Is this a bug fix or adding new feature?
feature.

What is this PR about? / Why do we need it?
Added multi-arch support including ARM.

What testing is done?

Verify the /bin/aws-efs-csi-driver binary was ARM when simulating an ARM environment with docker run.

docker run --name aws-efs-csi-driver --platform linux/arm64 --rm --network host  --entrypoint="" -it jqmichael/aws-efs-csi-driver:2 /bin/bash -c "yum -y install file; file /bin/aws-efs-csi-driver"

---
/bin/aws-efs-csi-driver: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped

Launched an a1 instance, which is ARM architecture, and verified the driver worked with the TLS example (had to use csi-node-driver-registrar from https://github.com/raspbernetes/multi-arch-images since upstream image isn't available yet).

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 26, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @jqmichael. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 26, 2020
Comment on lines -11 to -13
- name: Build container image
run: |
docker build -t aws-efs-csi-driver .
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for a separate build step because docker buildx build and push are run at the same step.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker buildx build subcommand has a number of flags which determine where the final image will be stored. By default, i.e. if none of the flags are specified, the resulting image will remain captive in docker’s internal build cache. This is unlike the regular docker build command which stores the resulting image in the local docker images list.

--push: This flag tells docker to push the resulting image to a docker registry. This currently is the best way to store multi-architecture images.

https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408

Comment on lines +48 to +52
docker buildx build \
-t $REPO:$TAG \
--platform=linux/amd64,linux/arm64 \
--progress plain \
--push .
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker buildx build and push are done as a single step.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker buildx build subcommand has a number of flags which determine where the final image will be stored. By default, i.e. if none of the flags are specified, the resulting image will remain captive in docker’s internal build cache. This is unlike the regular docker build command which stores the resulting image in the local docker images list.

--push: This flag tells docker to push the resulting image to a docker registry. This currently is the best way to store multi-architecture images.

https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408

@wongma7
Copy link
Contributor

wongma7 commented Aug 26, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 26, 2020
@wongma7
Copy link
Contributor

wongma7 commented Aug 27, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 27, 2020
@wongma7
Copy link
Contributor

wongma7 commented Aug 27, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jqmichael, wongma7

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 27, 2020
@wongma7
Copy link
Contributor

wongma7 commented Aug 27, 2020

merging because coveralls is bugged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants